Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Explicitly set multiprocessing start method to "fork" #405

Merged
merged 1 commit into from
Mar 26, 2021

Conversation

amotl
Copy link
Member

@amotl amotl commented Mar 25, 2021

Hi there,

because @mfussenegger said at #386 (comment):

I'm not keen on building workarounds for problems that should be solved.

this patch provides a better alternative than my initial attempts at #386, as it tries to tackle the underlying root cause of one detail which made the testsuite croak on macOS. Specifically, it resolves #398.

By using multiprocessing's ForkProcess, the testsuite will also start working on macOS again, even on Python 3.8+.

The background on this is that beginning with Python 3.8+, "fork" is not the default on all platforms anymore but has been changed to "spawn" on macOS. This method, however, apparently is not compatible with how multiprocessing is currently used within the test harness.

With kind regards,
Andreas.

By using multiprocessing's ForkProcess, the testsuite will also start
working on macOS again, even on Python 3.8+.

The background on this is that beginning with Python 3.8+, "fork" is not
the default on all platforms anymore but has been changed to "spawn" on
macOS. This method, however, apparently is not compatible with how 
multiprocessing is currently used within the test harness.
@amotl amotl requested review from mfussenegger and seut March 25, 2021 21:33
Copy link
Member

@seut seut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks for tracking this down.

@amotl amotl merged commit 0ade9e4 into master Mar 26, 2021
@amotl amotl deleted the amo/improve-testsuite-macos branch March 26, 2021 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running the tests raise "TypeError: cannot pickle '_io.TextIOWrapper' object"
2 participants